from rest_framework import viewsets, status
from rest_framework.decorators import action
from rest_framework.response import Response

from drf_spectacular.utils import extend_schema

from .models import Department,Position,Role
from .serializers import DepartmentSerializer,PositionSerializer,RoleSerializer


@extend_schema(
    tags=['System']
)
class DepartmentViewSet(viewsets.ModelViewSet):
    queryset = Department.objects.all()
    serializer_class = DepartmentSerializer


@extend_schema(
    tags=['System']
)
class PositionViewSet(viewsets.ModelViewSet):
    queryset = Department.objects.all()
    serializer_class = PositionSerializer


@extend_schema(
    tags=['System']
)
class RoleViewSet(viewsets.ModelViewSet):
    queryset = Department.objects.all()
    serializer_class = RoleSerializer